#pragma once // BANK_H
#include "debt.h"
#include "income.h"



class CBank
{
public:
  CBank( std::string name = "", std::string description = "",
       long double balance = 0, unsigned int uuid = 0);
  ~CBank();
public:
    void print();
    std::string getName() { return m_name; }
    std::string getDescription() { return m_description; } 
    long double getBalance() { return m_balance; }
    unsigned int getUUID() { return m_uuid; }
    void setName( std::string name ) { m_name = name; }
    void setDescription( std::string description ) { m_description = description; }
    void setBalance( long double balance ) { m_balance = balance; }
    void calcNewBalance();
    void addNewDebt(std::string debtName, long double debt, double rate);
    void addNewIncome(std::string incomeName, long double income, double rate);
    unsigned int maxDebt();
    unsigned int maxIncome();
private:
    std::string m_name;
    std::string m_description;
    long double m_balance;
    unsigned int m_uuid;
    std::vector<CDebt> m_debts;
    std::vector<CIncome> m_incomes;
    long double combineDebts();
    long double combineIncomes();
    
};

// END BANK_H